<%@ page pageEncoding="utf-8"   isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>登录 - 当当网</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="${path}/front/css/login.css" rel="stylesheet" type="text/css" />
		<link href="${path}/front/css/page_bottom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${path}/front/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
			$(function(){
			var emails=false;
				
				var isOK3=false;
				
			
			
			//邮箱验证
				$("#txtEmail").blur(function(){
					//获取email
					var email=$("#txtEmail").val();	
					//判断是否为空
					if(email==""){
						$("#emailMsg").html("邮箱必填");
					}else{
						//判断格式是否正确
						var s=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
						if(s.test(email)){
							$("#emailMsg").html("验证成功").css("color","green");
							emails=true;
						}else{
							$("#emailMsg").html("邮箱格式不正确");
						}
					}
				});
			
			//密码验证
				$("#txtPassword").blur(function(){
					//获取email
					var password=$("#txtPassword").val();
					//判断是否为空
					if(password==""){
						$("#passwordMsg").html("密码必填");
					}else{
						if(password.length>=6){
							$("#passwordMsg").html("验证成功").css("color","green");
							isOK3=true;
						}else{
							$("#passwordMsg").html("密码最少6位");
						}
					}
				});
			$("form").submit(function(){
					
					
					//将所有的表单验证验证一遍，
					$("input").trigger('blur');
					//alert(email && isOK2 && isOK3 && isOK4 && isOK5);
					/* alert("emails"+emails);
					alert("isOK2"+isOK2);
					alert("isOK3"+isOK3);
					alert("isOK4"+isOK4);
					alert("isOK5"+isOK5); */
					//判断是否验证通过
					if(emails && isOK3 ){
						
						//提交表单
						$("form").submit();
					}else{
						return false;
					}
				});
			
			
			});
		</script>
	</head>
	<body>


		<%@include file="/front/common/head1.jsp"%>

		<div class="enter_part">

			<%@include file="/front/common/introduce.jsp"%>

			<div class="enter_in">
				<div class="bj_top"></div>
				<div class="center">
					<div style="height: 30px; padding: 5px; color: red" id="divErrorMssage">
					
					</div>
					<div class="main">
						<h3>
							登录当当网
						</h3>

						<form method="post" action="${path}/frontUser/Login" id="ctl00">
			<span style="color:red">${qqq}</span>
							<ul>
								<li>
									<span>请输入Email地址：</span>
									<input type="text" name="fuser11.email" id="txtEmail" class="textbox" />
									
								</li>
								<li><span id="emailMsg" style="color:red"></span></li>
								<li>
									<span class="blank">密码：</span>
									<input type="password" name="fuser11.password" id="txtPassword" class="textbox" />
									
								</li>
								<li><span id="passwordMsg" style="color:red"></span></li>
								<li>
									<input type="submit" id="btnClientRegister" class="button_enter" value="登 录" />
								</li>
							</ul>
							<input type="hidden" name="uri" value="${uri}" />
						</form>
					</div>
					<div class="user_new">
						<p>
							您还不是当当网用户？
						</p>
						<p class="set_up">
							<a href="register_form.jsp">创建一个新用户&gt;&gt;</a>
						</p>
					</div>
				</div>
			</div>
		</div>

		<%@include file="../common/foot1.jsp"%>

	</body>
</html>

